package com.code.springbootlogback.controller;

import com.code.springbootlogback.service.IndexService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/*
 * @author: liyufei
 * @date: 2018-05-17 10:37
 */
@Slf4j
@Controller
public class IndexController {

    @Autowired
    private IndexService indexService;

    @RequestMapping("/index")
    public String index() {
        log.info("=====访问项目首页开始=====");
        indexService.index();
        log.info("=====访问项目首页结束=====");
        return "index";
    }
}
